from ultralytics import YOLO


def train():
    # Create a new YOLO model from scratch
    model = YOLO("yolo11-C3k2-DBB.yaml")
    model.train(data='CCTSDB2021.yaml',
                lr0=0.001,
                name='yolo11-C3k2-DBB',
                epochs=300,  # 训练轮次，我是训练300
                # batch=16,
                # close_mosaic=10,
                # workers=8,
                # device='0',
                # optimizer='SGD',  # using SGD
                # resume='', # last.pt path
                # amp=False, # close amp
                # fraction=0.2,
                # project='runs/train',  # 用于保存训练相关的文件和记录
                # name='exp',
                )


# 这个CTSDB2021.yaml文件在哪？、
# 数据集文件夹找一下


if __name__ == '__main__':
    # model = "best.pt"
    train()
    # predict(model=model)
